package com.base.cn.platform.os.common;

import com.alibaba.fastjson.JSON;
import com.base.cn.platform.os.common.msg.Message;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 文 件 名:StatMessageReceiver
 * 创 建 人:hackeridear
 * 创建日期:2018-12-19
 * 描   述:StatMessageReceiver
 * 修 改 人:
 * 修改日期:
 * 版 本 号:v 1.0.0
 */
@Component
@Slf4j
public class StatMessageReceiver {

    @Async
    public void getMsg(String message) {
        log.info("订阅消息：{}", message);
        Message msg = JSON.parseObject(message, Message.class);
        switch (msg.getMsgType()) {
            case ADD_ORDER:
                break;
            case user_login:
                break;
            case modify_goods:
                break;
            case modify_paper:
                break;
            case modify_answer:
                break;
            case user_registry:
                break;
            case pv:
                break;
            case uv:
                break;
            case modify_questions:
                break;
            case pay_success_order:
                break;
            default:
                break;
        }
    }
}
